package com.lcxw.hxzb.friendcircle.project.system.controller;

import com.lcxw.hxzb.friendcircle.framework.web.controller.BaseController;
import com.lcxw.hxzb.friendcircle.framework.web.domain.AjaxResult;
import com.lcxw.hxzb.friendcircle.framework.web.page.TableDataInfo;
import com.lcxw.hxzb.friendcircle.project.system.domain.YwpdGame;
import com.lcxw.hxzb.friendcircle.project.system.service.IYwpdGameService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 陪玩游戏类型Controller
 * 
 * @author ruoyi
 * @date 2020-09-15
 */
@RestController
@Api(tags = "陪玩游戏类型Controller")
@RequestMapping("/client/game")
public class YwpdGameController extends BaseController
{
    @Autowired
    private IYwpdGameService ywpdGameService;

    /**
     * 查询陪玩游戏类型列表
     */
    @GetMapping("/list")
    public TableDataInfo list(YwpdGame ywpdGame)
    {
        startPage();
        List<YwpdGame> list = ywpdGameService.selectYwpdGameList(ywpdGame);
        return getDataTable(list);
    }


    /**
     * 获取陪玩游戏类型详细信息
     */
    @GetMapping(value = "/{gameId}")
    public AjaxResult getInfo(@PathVariable("gameId") Long gameId)
    {
        YwpdGame ywpdGame = ywpdGameService.selectYwpdGameById(gameId);
        return AjaxResult.success(ywpdGame);
    }

}
